:root {
    --bg: #3d3f43;
    --nav-bg: #131315;
    --primary: #FFBF37;
    --nav-item-color: white;
    --nav-border: #8F9A9E;
    --white: #fff;
    --gap: 0.5rem;
    --item-width: 5.25rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Inter", sans-serif;
    font-size: 16px;
    display: grid;
    place-items: center;
    height: 100vh;
    background: var(--bg);
    padding: 0.1rem;
}

.navigation {
    max-width: fit-content;
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 1rem 2rem;
    padding-top: 1.5rem;
    background: var(--nav-bg);
    box-shadow: 0px 4px 16px 0px rgba(148, 156, 169, 0.15);
    border-radius: 1rem;
    border: 1px solid rgba(148, 156, 169, 0.15);
    user-select: none;
}

.nav-list {
    display: flex;
    list-style-type: none;
    gap: var(--gap);
    position: relative;
}

.nav-list>li {
    width: var(--item-width);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.nav-list>li>a {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 4rem;
    gap: 0.5rem;
    width: 100%;
    color: var(--nav-item-color);
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

.nav-list>li>a>svg {
    width: 2rem;
    height: 2rem;
    stroke: var(--nav-item-color);
    transition: all 0.2s ease-in-out;
}

.nav-list>li:hover>a {
    color: var(--primary);
}

.nav-list>li:hover>a>svg {
    stroke: var(--primary);
}

.nav-list>.active>a {
    color: var(--primary);
}

.nav-list>.active>a>svg {
    stroke: var(--primary);
}

.active-bar {
    position: absolute;
    top: -1rem;
    min-width: var(--item-width);
    height: 0.5rem;
    background: var(--primary);
    z-index: 1;
    border-radius: 0.25rem;
    transition: 0.5s;
}

.nav-list li:nth-child(1).active~.active-bar {
    transform: translatex(calc(0));
}

.nav-list li:nth-child(2).active~.active-bar {
    transform: translatex(calc(var(--item-width) + var(--gap)));
}

.nav-list li:nth-child(3).active~.active-bar {
    transform: translatex(calc(var(--item-width)*2 + var(--gap)*2));
}

.nav-list li:nth-child(4).active~.active-bar {
    transform: translatex(calc(var(--item-width)*3 + var(--gap)*3));
}